package com.byCreation.Profile;

import com.byCreation.Control.Control;
import com.byCreation.t_globe.R;
import com.google.analytics.tracking.android.EasyTracker;
import com.google.analytics.tracking.android.GoogleAnalytics;
import com.google.analytics.tracking.android.Tracker;
import com.squareup.picasso.Picasso;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.Window;
import android.webkit.WebSettings.LayoutAlgorithm;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

public class DetailNotisActivity extends Activity {

	
	
	// ===============GoogleAnalytics==============
	private GoogleAnalytics mGaInstance;
	private Tracker mGaTracker;
	// =============================================
	// ===================================googleAnalytics=============================
	@Override
	public void onStart() {
		super.onStart();
		// The rest of your onStart() code.
		EasyTracker.getInstance().activityStart(this); // Add this method.
		mGaTracker.sendView("Detail Notice Screen");
	
	}
	
	@Override
	public void onStop() {
		super.onStop();
		// The rest of your onStop() code.
		EasyTracker.getInstance().activityStop(this); // Add this method.
	
	}

// ========================================================
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_detail_notis);
		
		
		// =============================GoogleAnalytics=========================
		mGaInstance = GoogleAnalytics.getInstance(this);
		mGaTracker = mGaInstance.getTracker(Control.IDGoogleanalytics);
		
		
		
		String Data=Control.Html;
		WebView webview=(WebView)findViewById(R.id.webView1);
		webview.loadDataWithBaseURL(null, Data, "text/html", "UTF-8", null);
		webview.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
		
		
		TextView txt=(TextView)findViewById(R.id.txt_title);
		txt.setText(Control.Title);
		
		TextView txt_subtitle=(TextView)findViewById(R.id.txt_subtitle);
		txt_subtitle.setText(Control.SubTitle);
		
		
		ImageView imageView1=(ImageView)findViewById(R.id.imageView1);
		Picasso.with(getBaseContext()).load(Control.Img).into(imageView1);
		
	
		
	}

	
}
